import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.OutputStream;
import java.rmi.RemoteException;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: 19182
 * Date: 2025-08-25
 * Time: 15:54
 */
public class demo2 {
    public static void main(String[] args) throws IOException {
        try(OutputStream outputStream = new FileOutputStream("./output.txt", true)){
            String str = "你好中国";
            byte[] bytes = str.getBytes("utf-8");
            outputStream.write(bytes);  //把字节数组些人文件
        }catch (IOException e){
            throw new RuntimeException(e);
        }
    }
}
